package com.iwuke.dance.wallet.starlight_value.adapter;

import android.content.Context;
import android.widget.ImageView;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.iwuke.dance.R;
import com.iwuke.dance.util.GlideUtil;
import com.iwuke.dance.wallet.starlight_value.starlight_value_bean.StarlightTransactionRecordHomepageBean;

import java.util.List;

import androidx.annotation.NonNull;

/**
 * @author: 魏从响
 * @date: 2025/9/23
 */
public class LiveDetailsIncomeAdapter extends BaseQuickAdapter<StarlightTransactionRecordHomepageBean, BaseViewHolder> {
    private final Context context;

    public LiveDetailsIncomeAdapter(Context context, int adapterLiveDetailsIncome, List<StarlightTransactionRecordHomepageBean> lists) {
        super(adapterLiveDetailsIncome, lists);
        this.context = context;
    }

    @Override
    protected void convert(@NonNull BaseViewHolder baseViewHolder, StarlightTransactionRecordHomepageBean s) {

        ImageView img_avatar = baseViewHolder.findView(R.id.img_avatar);//头像
        TextView tv_item_title = baseViewHolder.findView(R.id.tv_item_title);//收到的小心心
        TextView tv_item_time = baseViewHolder.findView(R.id.tv_item_time);//时间
        TextView tv_starlight_value = baseViewHolder.findView(R.id.tv_starlight_value);//+1星光值

        GlideUtil.setImageView(context,s.giftImg,img_avatar);
        tv_item_title.setText(s.giftName);
        tv_item_time.setText(s.createTime);
        tv_starlight_value.setText("+"+s.taxAfterValue+"星光值");


    }
}
